package com.yunhe.estatemanage.repository;

import com.yunhe.estatemanage.domain.ProcessStatus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: ProcessStatusRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 16:52 2021/9/3
 */
@Repository
public interface ProcessStatusRepository {

    /**
     * @Description 创建流程状态
     * @Param ProcessStatus processStatus
     * @Return int
     * @Date 2021/9/7 9:16
     */
    int create(ProcessStatus processStatus);

    /**
     * @Description 根据id删除流程状态
     * @Param int id
     * @Return int
     * @Date 2021/9/7 9:16
     */
    int deleteByPrimaryKey(@Param("id") int id);

    /**
     * @Description 根据id更新流程状态
     * @Param ProcessStatus processStatus
     * @Return int
     * @Date 2021/9/7 9:16
     */
    int updateByPrimaryKey(ProcessStatus processStatus);

    /**
     * @Description 根据id查询流程状态
     * @Param int id
     * @Return ProcessStatus
     * @Date 2021/9/7 9:17
     */
    ProcessStatus searchByPrimaryKey(@Param("id") int id);

    /**
     * @Description 根据报事报修事项id查询历史流程状态
     * @Param Long reportRepairId
     * @Return List<ProcessStatus>
     * @Date 2021/9/7 9:17
     */
    List<ProcessStatus> getProcessByReportRepairId(@Param("reportRepairId") Long reportRepairId);

    /**
     * @Description 获取历史处理反馈
     * @Param Long id
     * @Return List<ProcessStatus>
     * @Date 2021/9/7 16:11
     */
    List<ProcessStatus> getFeedbackHistory(@Param("id") Long id);
}
